\begin{tikzpicture}[node distance=12ex]

	\labeledcompoundnode{client}{component}{Client}{
		
		\node[capability] (clientpdcap) {};
	}

	\labeledcompoundnode{child}{component, below of=client, xshift=-10ex}{Child}{
		
		\node[capability] (childpdcap) {};
		\node[capability, right of=childpdcap] (childclientpdcap) {};
	}

	\labeledcompoundnode{server}{component, left of=child, xshift=-18ex}{Server}{
		
		\node[capability] (serverpdcap) {};
		\node[capability, right of=serverpdcap] (serverclientpdcap) {};
	}

	\labeledcompoundnode{init}{component, node distance=10ex, below of=child, xshift=-15ex}{Init}{
		
%		\node[capability] (initpdcap) {2};
%		\downwardthreadnode{initthread}{inner sep=0, node distance=0ex, left=4ex of initpdcap}
%		\node[capability, right of=initpdcap] (initchildpdcap) {3};
	}

	\labeledcompoundnode{core}{component, node distance=10ex, below of=init}{Core}{

		\rpcobjectrnode{pdserver}{}{}{PD session}

		\rpcobjectrnode{pdchild}{node distance=25ex, right of=pdserver}{}{PD session}

		\rpcobjectrnode{pdclient}{node distance=25ex, right of=pdchild}{}{PD session}
	}

	% capability associations
	\path [draw, dashed] (pdservercap) -- (serverpdcap);
	\path [draw, dashed] (pdchildcap) -- (childpdcap);
	\path [draw, dashed] (pdclientcap) -- (childclientpdcap);
	\path [draw, dashed] (childclientpdcap) -- (clientpdcap);
	\path [draw, dashed] (clientpdcap) -- (serverclientpdcap);

	% delegation of the client's PD session to the server
	\delegationpath (clientpdcap)
	      .. controls +(-1,0) and +(0,1) ..
	      node[sloped, above] {delegate} (serverclientpdcap);

	\newcommand\transferpath{
		\path [color=green!50!black!70, text=black,
		       decoration={markings,
		                   mark=between positions 0.03 and 1 step 1ex with {\arrow{latex}}},
		       postaction={decorate}]}

	\transferpath (pdchildobj) .. controls +(0,1) and +(0,1) .. (pdclientobj);
	\transferpath (pdclientobj) .. controls +(0,-1) and +(0,-1) .. (pdserverobj);


\end{tikzpicture}
